# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit unpacker

DESCRIPTION="A GUI Serial Debug Tool for Linux/Mac OS"

HOMEPAGE="https://github.com/carloscn/tinyserial"

SRC_URI="https://github.com/carloscn/tinyserial/releases/download/v1.4/TinySerial-v1.4.0-ubuntu22.04-amd64.deb -> ${PF}.deb"

LICENSE="MPL"
SLOT="0"
KEYWORDS="amd64"

RDEPEND="=dev-qt/qtserialport-5*"
DEPEND="${RDEPEND}"

S=${WORKDIR}/tinyserial

src_unpack() {
	unpack_deb ${A}
}

src_install() {
	cd ${D} || die
	mkdir -p usr/bin || die
	cp ${S}/application/tinyserial/tinyserial/tinyserial  ${D}/usr/bin || die
}
